var data = []
//添加病例节点
for (var i = 0;i<oridata.length;i++){
    var tmp = {};
    tmp.name = '病例'+oridata[i].name;
    tmp.category = 0;
    tmp.label = {show:true,position:'inside'}
    data.push(tmp)
}
//添加地点
for (var i = 0;i<Object.keys(trip_dic).length;i++){
    var tmp = {};
    tmp.name = trip_dic[i];
    tmp.category = 1;
    tmp.label = {show:true,position:'inside'}
    data.push(tmp)
}
//添加医院
for (var i = 0;i<Object.keys(hospital_dic).length;i++){
    var tmp = {};
    tmp.name = hospital_dic[i];
    tmp.category = 2;
    tmp.label = {show:true,position:'inside'}
    data.push(tmp)
}
//添加节点公共设置
for (var i = 0;i<data.length;i++) {
    data[i].symbolSize = 30
    data[i].draggable = true;
}

var link = []
//添加病例之间关系
for (var i = 0;i<orilink.length;i++){
    var tmp = {};
    tmp.source = '病例'+orilink[i].source;
    tmp.target = '病例'+orilink[i].target;
    tmp.label = {show:true,formatter:orilink[i].link}
    link.push(tmp)
}
//添加病例去往目的地
for (var i=0;i<trip.length;i++){
    var tmp1 = {};
    tmp1.source = trip_dic[trip[i].start];
    tmp1.target = '病例'+trip[i].name;
    link.push(tmp1)
    var tmp2 = {};
    tmp2.source = '病例'+trip[i].name;
    tmp2.target = trip_dic[trip[i].stop];
    link.push(tmp2)
}
//添加病例去往医院
for (var i = 0;i<oridata.length;i++){
    var tmp = {};
    tmp.source = '病例'+oridata[i].name;
    tmp.target = hospital_dic[oridata[i].hospital];
    link.push(tmp)
}
//添加医院所在地关系
for (var i = 0;i<hospital_destination.length;i++){
    var tmp = {};
    tmp.source = hospital_dic[hospital_destination[i].hospital];
    tmp.target = trip_dic[hospital_destination[i].destination];
    link.push(tmp)
}